package models

import "time"

type User struct {
	ID          int         `gorm:"primary_key",json:"id,omitempty"`
	Username    string      `gorm:"type:varchar(100);not null",json:"username,omitempty"`
	Password    string      `gorm:"type:varchar(255);not null",json:"password,omitempty"`
	Telephone   string      `gorm:"type:varchar(100);not null",json:"telephone,omitempty"`
	Loginip     string      `gorm:"type:varchar(20)",json:"loginip,omitempty"`
	Logintime   time.Time   `gorm:"type:datetime(0)",json:"logintime,omitempty"`
	Addtime     time.Time   `gorm:"type:datetime(0)",json:"addtime,omitempty"`
	Commemt     int         `gorm:"type:tinyint(1)",json:"commemt,omitempty"`
	Sex         int         `gorm:"type:tinyint(1)",json:"sex,omitempty"`
	QQ          string      `gorm:"type:varchar(50)",json:"qq,omitempty"`
	Email       string      `gorm:"type:varchar(255)",json:"email,omitempty"`
	Avatar      string      `gorm:"type:varchar(255)",json:"avatar,omitempty"`
	Posts_num   int         `gorm:"type:int(8)",json:"posts_num,omitempty"`
	Follows_num int         `gorm:"type:int(8)",json:"follows_num,omitempty"`
	Fans_num    int         `gorm:"type:int(8)",json:"fans_num,omitempty"`
	GPA         float32     `gorm:"type:double(4,2)",json:"gpa,omitempty"`
	SAT         int         `gorm:"type:int(8)",json:"sat,omitempty"`
	IELTS       float32     `gorm:"type:double(6,2)",json:"ielts,omitempty"`
	TOEFL       float32     `gorm:"type:double(6,2)",json:"toefl,omitempty"`
	Recommend   interface{} `gorm:"type:json",json:"recommend,omitempty"`
}
